package im.xz.cn.xiacore.methods;
import org.bukkit.Material;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.SkullMeta;
import java.util.ArrayList;
public class playerHead {
    public static ItemStack getHead(Player player, int amount, boolean light, String displayName, String lore1, String lore2, String lore3) {
        ItemStack head = new ItemStack(Material.PLAYER_HEAD, amount);
        SkullMeta skullMeta = (SkullMeta)head.getItemMeta();
        String name = player.getName();
        skullMeta.setEnchantmentGlintOverride(light);
        skullMeta.setDisplayName(displayName);
        ArrayList<String> head_lore = new ArrayList<>();
        head_lore.add(lore1);
        head_lore.add(lore2);
        head_lore.add(lore3);
        skullMeta.setLore(head_lore);
        skullMeta.setOwningPlayer((OfflinePlayer)player);
        head.setItemMeta((ItemMeta)skullMeta);
        return head;
    }
}